package com.example.hy2110szyx.service;

import com.example.hy2110szyx.entity.*;
import com.example.hy2110szyx.vo.PageVo;
import com.example.hy2110szyx.vo.ReservedVo;
import com.github.pagehelper.Page;

import java.util.List;

public interface ReservedService {

    /**
     * 分页
     * @return
     */
    Page<ReservedTicket> queryAllReservedForPage(PageVo<ReservedVo> pageVo);

    /**
     * 按条件查询订单
     * @return
     */
    List<ReservedVo> queryAllConn(ReservedVo reservedTicket);

    /**
     * 根据身份证号查询用户
     * @param identity
     * @return
     */
//    ReservedTicket queryByIdentity(String identity);

    /**
     * 插入一条订票信息
     * @param reserved
     */
    void insertOne(ReservedTicket reserved);
    void insertOneRoute(Route route);
    void insertOneDistribution(Distribution distribution);
    void insertOneCustomer(Customer customer);
    void insertOneFlightInfo(FlightInfo flightInfo);

    /**
     * 根据身份证号删除订单
     * @param id
     */
    void deleteSomeById(Integer id);

    void delOneFlightInfo(String fno);

    void delOneRoute(String rno);

    void delOneDistribution(String fno);

    void delOneCustomer(String identity);

}
